<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ page session="true"%>
<%
	if (session.getAttribute("user") == null) {

		RequestDispatcher rd = request
				.getRequestDispatcher("/LoginForm.jsp");
		rd.forward(request, response);
%>
<%
	}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>

		<script language="JavaScript"
			src="<%=request.getContextPath()
							+ "/js/gen_validatorv31.js"%>"
			type="text/javascript"></script>




	</head>

	<body>


		<jsp:include page="Header.jsp"></jsp:include>
		<br />

		<font color="red"><center>
				<%
					if (request.getAttribute("status") != null) {
				%>
				<font color="red"><%=request.getAttribute("status")%></font>
				<%
					}
				%>
			</center> </font>
		<center>
			<b><h4>
					Add New Package Here
				</h4> </b>
		</center>


		<form action="<%=request.getContextPath() + "/AddPackage"%>"
			method="post" name="AddPackage">




			<table cellspacing=2 align="center" bgcolor="#87CEEB" width="325"
				height="60">




				<tr>
					<td align='right'>
						<b>Package Name :</b>
						<br>
					</td>
					<td>
						<input type=text name="pname" value="" />
						<br>
				<tr>
					<td align='right'>
						<b> Package Discription :</b>
						<br>
					</td>
					<td>
						<input type=text name="pdiscription" value="" />
						<br>
				<tr>
					<td align='right'>
						<b>Package Amount :</b>
						<br>
					</td>
					<td>
						<input type=text name="pamount" value="" />

						<br>
					</td>

				</tr>


				<tr>
					<td align='right'>
						<input type=submit value="Add" />
						<br>
					</td>
					<td align='left'>
						<input type=reset value="clear" />
						<br>
					</td>
				</tr>

			</table>

			<br />
			<jsp:include page="Footer.jsp"></jsp:include>

		</form>

		<script language="JavaScript" type="text/javascript">
//You should create the validator only after the definition of the HTML form
  var frmvalidator  = new Validator("AddPackage");

  frmvalidator.addValidation("pname","req","Package Name is required");
    frmvalidator.addValidation("pname","alpha","Package Name is Only Characters");
    
    frmvalidator.addValidation("pdiscription","req","PacakgeDiscription is required");
       
    frmvalidator.addValidation("pamount","req","PackageAmount  is required");
    frmvalidator.addValidation("pamount","numeric","PackageAmount is Only Numbers");
    

    
    </script>
	</body>
</html>

